import React, { useState, useContext, createContext } from 'react'
import { Tabs, Button } from 'antd';
import HeroDiv from "../../../components/HeroDiv"
function Tab7() {
    const { TabPane } = Tabs;
    const callback = (key: any) => {
        console.log(key);
    }
    const myContext = createContext(0);

    const [count, setCount] = useState(0)
    return (
        <div>
            <Tabs defaultActiveKey="1" onChange={callback} >
                <TabPane tab="最佳拍档" key="1">
                    <Button type="primary" onClick={() => {
                        // setCount(count + 1),

                    }}>+添加英雄</Button>
                    <myContext.Provider value={count}>
                        <HeroDiv />
                    </myContext.Provider>
                </TabPane>
                <TabPane tab="被谁克制" key="2">
                    <Button type="primary">+添加英雄</Button>

                </TabPane>
                <TabPane tab="克制谁" key="3">


                </TabPane>
            </Tabs>
        </div >
    )
}

export default Tab7
